const main = require('../main/main');

describe('taxi fee', function () {
    // write your tests here...
    it("returns total  given miles less than 2 ",function(){
        let miles= 1;
        let waittime = 0;
        let result = main(miles,waittime);
        expect(result).toEqual(parseInt(6+0.25*waittime));
           
    });



    it("returns total  given miles from 2 to 8 ",function(){
        let miles= 4;
        let waittime = 10;
        let result = main(miles,waittime);
        expect(result).toEqual(parseInt(0.8*miles+0.25*waittime));
           
    });
    it("returns total  given miles great than 8 ",function(){
        let miles= 9;
        let waittime = 10;
        let result = main(miles,waittime);
        expect(result).toEqual(parseInt(0.8*miles+(miles-8)*0.4+0.25*waittime));
           
    });
});
